package com.aboverock.module.system.validator.constraints;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import com.aboverock.module.system.validator.constraintvalidators.UniqueLoginNameValidator;

/**
 * 验证本地帐号登录名是否唯一.
 *
 * @author Rock Wang
 */
@Documented
@Constraint(validatedBy = { UniqueLoginNameValidator.class })
@Target({ FIELD, PARAMETER })
@Retention(RUNTIME)
public @interface UniqueLoginName {
    String message() default "{smart.constraints.LoginName.user.unique.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
